<!-- HTML header for doxygen 1.8.13-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link rel="icon" type="image/x-icon" href="favicon.ico" />
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>chigraph: chi::Subprocess Struct Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="chigraphDoxygenIcon.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">chigraph
   &#160;<span id="projectnumber">master</span>
   </div>
   <div id="projectbrief">Systems programming language written for beginners in LLVM</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('structchi_1_1Subprocess.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="structchi_1_1Subprocess-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">chi::Subprocess Struct Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Provides an platform-independent abstraction for creating subprocesses.  
 <a href="structchi_1_1Subprocess.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="Subprocess_8hpp_source.html">chi/Support/Subprocess.hpp</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:a7ae98dd49171bcffb8d3a64714b4f5b1"><td class="memItemLeft" align="right" valign="top"><a id="a7ae98dd49171bcffb8d3a64714b4f5b1"></a>
using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structchi_1_1Subprocess.html#a7ae98dd49171bcffb8d3a64714b4f5b1">pipeHandler</a> = std::function&lt; void(const char *data, size_t size)&gt;</td></tr>
<tr class="memdesc:a7ae98dd49171bcffb8d3a64714b4f5b1"><td class="mdescLeft">&#160;</td><td class="mdescRight">The function type for recieving data from pipes. <br /></td></tr>
<tr class="separator:a7ae98dd49171bcffb8d3a64714b4f5b1"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a650660115d11ccf9f4d0e3569554115e"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structchi_1_1Subprocess.html#a650660115d11ccf9f4d0e3569554115e">Subprocess</a> (const boost::filesystem::path &amp;pathToExecutable)</td></tr>
<tr class="memdesc:a650660115d11ccf9f4d0e3569554115e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Construct a <a class="el" href="structchi_1_1Subprocess.html" title="Provides an platform-independent abstraction for creating subprocesses. ">Subprocess</a> with a path to an executable.  <a href="#a650660115d11ccf9f4d0e3569554115e">More...</a><br /></td></tr>
<tr class="separator:a650660115d11ccf9f4d0e3569554115e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9c0188c9acdac32fa874f9539818b99b"><td class="memItemLeft" align="right" valign="top"><a id="a9c0188c9acdac32fa874f9539818b99b"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structchi_1_1Subprocess.html#a9c0188c9acdac32fa874f9539818b99b">~Subprocess</a> ()</td></tr>
<tr class="memdesc:a9c0188c9acdac32fa874f9539818b99b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Wait for the process to exit and close all open handles. <br /></td></tr>
<tr class="separator:a9c0188c9acdac32fa874f9539818b99b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1a8a312f1f2279a6b0290c3794968136"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structchi_1_1Result.html">Result</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structchi_1_1Subprocess.html#a1a8a312f1f2279a6b0290c3794968136">start</a> ()</td></tr>
<tr class="memdesc:a1a8a312f1f2279a6b0290c3794968136"><td class="mdescLeft">&#160;</td><td class="mdescRight">Start the process.  <a href="#a1a8a312f1f2279a6b0290c3794968136">More...</a><br /></td></tr>
<tr class="separator:a1a8a312f1f2279a6b0290c3794968136"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9b2f4ecd9a0239232deaf3ff46c48bf0"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structchi_1_1Subprocess.html#a9b2f4ecd9a0239232deaf3ff46c48bf0">started</a> () const</td></tr>
<tr class="memdesc:a9b2f4ecd9a0239232deaf3ff46c48bf0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Check if the child has started (<code><a class="el" href="structchi_1_1Subprocess.html#a1a8a312f1f2279a6b0290c3794968136" title="Start the process. ">start()</a></code> has been called)  <a href="#a9b2f4ecd9a0239232deaf3ff46c48bf0">More...</a><br /></td></tr>
<tr class="separator:a9b2f4ecd9a0239232deaf3ff46c48bf0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr><td colspan="2"><div class="groupHeader">Setup Functions</div></td></tr>
<tr><td colspan="2"><div class="groupText"><p>Setup functions are called after the cosntructor, but before <code><a class="el" href="structchi_1_1Subprocess.html#a1a8a312f1f2279a6b0290c3794968136" title="Start the process. ">start()</a></code>.</p>
<p>Most of them cannot be called after <code><a class="el" href="structchi_1_1Subprocess.html#a1a8a312f1f2279a6b0290c3794968136" title="Start the process. ">start()</a></code>. They are used to set parameters for the program's execution </p>
</div></td></tr>
<tr class="memitem:a38101f1406d62b1dc386072f576b990f"><td class="memTemplParams" colspan="2">template&lt;typename ForwardIterator &gt; </td></tr>
<tr class="memitem:a38101f1406d62b1dc386072f576b990f"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="structchi_1_1Subprocess.html#a38101f1406d62b1dc386072f576b990f">setArguments</a> (const ForwardIterator &amp;begin, const ForwardIterator &amp;end)</td></tr>
<tr class="memdesc:a38101f1406d62b1dc386072f576b990f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the arguments for the program with a begin and end iterator.  <a href="#a38101f1406d62b1dc386072f576b990f">More...</a><br /></td></tr>
<tr class="separator:a38101f1406d62b1dc386072f576b990f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8a66d790bd0984727c5a45e00fb05f58"><td class="memTemplParams" colspan="2">template&lt;typename Range &gt; </td></tr>
<tr class="memitem:a8a66d790bd0984727c5a45e00fb05f58"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="structchi_1_1Subprocess.html#a8a66d790bd0984727c5a45e00fb05f58">setArguments</a> (Range &amp;&amp;range)</td></tr>
<tr class="memdesc:a8a66d790bd0984727c5a45e00fb05f58"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the arguments for the program with a range.  <a href="#a8a66d790bd0984727c5a45e00fb05f58">More...</a><br /></td></tr>
<tr class="separator:a8a66d790bd0984727c5a45e00fb05f58"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae280118b573601a288c6c8eaac834d6c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structchi_1_1Subprocess.html#ae280118b573601a288c6c8eaac834d6c">setArguments</a> (std::initializer_list&lt; const char *&gt; init)</td></tr>
<tr class="memdesc:ae280118b573601a288c6c8eaac834d6c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the arguments for the program with an initializer_list.  <a href="#ae280118b573601a288c6c8eaac834d6c">More...</a><br /></td></tr>
<tr class="separator:ae280118b573601a288c6c8eaac834d6c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a889d6dcbd8488df673b6e12c29447e7c"><td class="memItemLeft" align="right" valign="top">const std::vector&lt; std::string &gt; &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structchi_1_1Subprocess.html#a889d6dcbd8488df673b6e12c29447e7c">arguments</a> () const</td></tr>
<tr class="memdesc:a889d6dcbd8488df673b6e12c29447e7c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the currently set arguments for the program.  <a href="#a889d6dcbd8488df673b6e12c29447e7c">More...</a><br /></td></tr>
<tr class="separator:a889d6dcbd8488df673b6e12c29447e7c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8a74fc88aa957ff035f446495b7c7a7a"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structchi_1_1Subprocess.html#a8a74fc88aa957ff035f446495b7c7a7a">attachToStdOut</a> (<a class="el" href="structchi_1_1Subprocess.html#a7ae98dd49171bcffb8d3a64714b4f5b1">pipeHandler</a> stdOutHandler)</td></tr>
<tr class="memdesc:a8a74fc88aa957ff035f446495b7c7a7a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Attach a function handler to the child stdout.  <a href="#a8a74fc88aa957ff035f446495b7c7a7a">More...</a><br /></td></tr>
<tr class="separator:a8a74fc88aa957ff035f446495b7c7a7a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad1c5751c1ef62ae1020aafdbeee36fbb"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structchi_1_1Subprocess.html#ad1c5751c1ef62ae1020aafdbeee36fbb">attachToStdErr</a> (<a class="el" href="structchi_1_1Subprocess.html#a7ae98dd49171bcffb8d3a64714b4f5b1">pipeHandler</a> stdErrHandler)</td></tr>
<tr class="memdesc:ad1c5751c1ef62ae1020aafdbeee36fbb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Attach a function handler to the child stderr.  <a href="#ad1c5751c1ef62ae1020aafdbeee36fbb">More...</a><br /></td></tr>
<tr class="separator:ad1c5751c1ef62ae1020aafdbeee36fbb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1b08709bbb208a970888ebcccc58906c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structchi_1_1Subprocess.html#a1b08709bbb208a970888ebcccc58906c">attachStringToStdOut</a> (std::string &amp;str)</td></tr>
<tr class="memdesc:a1b08709bbb208a970888ebcccc58906c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Attach a string to stdout.  <a href="#a1b08709bbb208a970888ebcccc58906c">More...</a><br /></td></tr>
<tr class="separator:a1b08709bbb208a970888ebcccc58906c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3f07d6a6acf5e139c5161210ae0726cb"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structchi_1_1Subprocess.html#a3f07d6a6acf5e139c5161210ae0726cb">attachStringToStdErr</a> (std::string &amp;str)</td></tr>
<tr class="memdesc:a3f07d6a6acf5e139c5161210ae0726cb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Attach a string to stderr.  <a href="#a3f07d6a6acf5e139c5161210ae0726cb">More...</a><br /></td></tr>
<tr class="separator:a3f07d6a6acf5e139c5161210ae0726cb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac15b0c5788d615c6cc9badd58bfa57b0"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structchi_1_1Subprocess.html#ac15b0c5788d615c6cc9badd58bfa57b0">setWorkingDirectory</a> (boost::filesystem::path newWd)</td></tr>
<tr class="memdesc:ac15b0c5788d615c6cc9badd58bfa57b0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the working directory of the process.  <a href="#ac15b0c5788d615c6cc9badd58bfa57b0">More...</a><br /></td></tr>
<tr class="separator:ac15b0c5788d615c6cc9badd58bfa57b0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr><td colspan="2"><div class="groupHeader">Runtime Functions</div></td></tr>
<tr><td colspan="2"><div class="groupText"><p>These functions are called while the process has started (ie after <a class="el" href="structchi_1_1Subprocess.html#a1a8a312f1f2279a6b0290c3794968136" title="Start the process. ">start()</a> is called) </p>
</div></td></tr>
<tr class="memitem:a62114d525126e682028af5a906f771a6"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structchi_1_1Result.html">Result</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structchi_1_1Subprocess.html#a62114d525126e682028af5a906f771a6">pushToStdIn</a> (const char *data, size_t size)</td></tr>
<tr class="memdesc:a62114d525126e682028af5a906f771a6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pushes data to the stdin stream of the child process.  <a href="#a62114d525126e682028af5a906f771a6">More...</a><br /></td></tr>
<tr class="separator:a62114d525126e682028af5a906f771a6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a45fd483d620609100cdd6065ce4751f2"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structchi_1_1Result.html">Result</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structchi_1_1Subprocess.html#a45fd483d620609100cdd6065ce4751f2">closeStdIn</a> ()</td></tr>
<tr class="memdesc:a45fd483d620609100cdd6065ce4751f2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Close the STDIN stream (send an EOF)  <a href="#a45fd483d620609100cdd6065ce4751f2">More...</a><br /></td></tr>
<tr class="separator:a45fd483d620609100cdd6065ce4751f2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9497b25fd496cd7a0ad464dfeb6e242d"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structchi_1_1Subprocess.html#a9497b25fd496cd7a0ad464dfeb6e242d">isStdInClosed</a> () const</td></tr>
<tr class="memdesc:a9497b25fd496cd7a0ad464dfeb6e242d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Checks if the stdin is closed.  <a href="#a9497b25fd496cd7a0ad464dfeb6e242d">More...</a><br /></td></tr>
<tr class="separator:a9497b25fd496cd7a0ad464dfeb6e242d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaaf29ada876d6088621cc0d8c84c7e47"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structchi_1_1Subprocess.html#aaaf29ada876d6088621cc0d8c84c7e47">kill</a> ()</td></tr>
<tr class="memdesc:aaaf29ada876d6088621cc0d8c84c7e47"><td class="mdescLeft">&#160;</td><td class="mdescRight">Kill the child process On POSIX, this sends SIGINT.  <a href="#aaaf29ada876d6088621cc0d8c84c7e47">More...</a><br /></td></tr>
<tr class="separator:aaaf29ada876d6088621cc0d8c84c7e47"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aeea9178c987445e45d97e4d4210a983c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structchi_1_1Subprocess.html#aeea9178c987445e45d97e4d4210a983c">wait</a> ()</td></tr>
<tr class="memdesc:aeea9178c987445e45d97e4d4210a983c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Wait for the process to complete.  <a href="#aeea9178c987445e45d97e4d4210a983c">More...</a><br /></td></tr>
<tr class="separator:aeea9178c987445e45d97e4d4210a983c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2f57bcbe46b93798d8ca769dc7aab4c9"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structchi_1_1Subprocess.html#a2f57bcbe46b93798d8ca769dc7aab4c9">exitCode</a> ()</td></tr>
<tr class="memdesc:a2f57bcbe46b93798d8ca769dc7aab4c9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Wait and gets the exit code.  <a href="#a2f57bcbe46b93798d8ca769dc7aab4c9">More...</a><br /></td></tr>
<tr class="separator:a2f57bcbe46b93798d8ca769dc7aab4c9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab07c04b4c4ef24cde067e11faf0837ce"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structchi_1_1Subprocess.html#ab07c04b4c4ef24cde067e11faf0837ce">running</a> ()</td></tr>
<tr class="memdesc:ab07c04b4c4ef24cde067e11faf0837ce"><td class="mdescLeft">&#160;</td><td class="mdescRight">Check if the process is still running.  <a href="#ab07c04b4c4ef24cde067e11faf0837ce">More...</a><br /></td></tr>
<tr class="separator:ab07c04b4c4ef24cde067e11faf0837ce"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Provides an platform-independent abstraction for creating subprocesses. </p>
<p>On OSX and Linux, this uses the POSIX api (<code>pipe()</code>, <code>fork()</code>, <code>exec()</code>, <code>write()</code>, <code>read()</code>, etc) and on windows it uses the win32 API (<code>CreatePipe()</code>, <code>CreateProcess()</code>, <code>ReadFile()</code>, etc)</p>
<p>Usage is you create a <a class="el" href="structchi_1_1Subprocess.html" title="Provides an platform-independent abstraction for creating subprocesses. ">Subprocess</a> class: </p><div class="fragment"><div class="line">    <a class="code" href="structchi_1_1Subprocess.html">chi::Subprocess</a> child{</div><div class="line"><span class="preprocessor">#ifdef WIN32</span></div><div class="line">        <span class="stringliteral">&quot;C:\\Windows\\System32\\cmd.exe&quot;</span></div><div class="line"><span class="preprocessor">#else</span></div><div class="line">        <span class="stringliteral">&quot;/bin/sh&quot;</span></div><div class="line"><span class="preprocessor">#endif</span></div><div class="line">    };</div></div><!-- fragment --><p> Now you can use any of the Setup Functions (see above). The string we pass to <code>attachStringToStdOut</code> is written from a differnt thread, so it's not safe to acces it until the program has exited.</p>
<div class="fragment"><div class="line">    std::string stdOut;</div><div class="line">    child.attachStringToStdOut(stdOut);</div></div><!-- fragment --><p> Once you're sure all youre setup variables are correctly set, start the process. You cannot change any of the setup values once you have called <a class="el" href="structchi_1_1Subprocess.html#a1a8a312f1f2279a6b0290c3794968136" title="Start the process. ">start()</a></p>
<div class="fragment"><div class="line">    <a class="code" href="structchi_1_1Result.html">chi::Result</a> res;</div><div class="line">    res += child.start();</div><div class="line">    <span class="keywordflow">if</span> (!res) {</div><div class="line">        std::cerr &lt;&lt; res &lt;&lt; std::endl;</div><div class="line">        <span class="keywordflow">return</span> 1;</div><div class="line">    }</div></div><!-- fragment --><p> Now that it's started, we can write data (if we wish) to stdin:</p>
<div class="fragment"><div class="line">    std::string dataToSend = <span class="stringliteral">&quot;echo hello&quot;</span>;</div><div class="line">    res += child.pushToStdIn(dataToSend.data(), dataToSend.size());</div><div class="line">    <span class="keywordflow">if</span> (!res) {</div><div class="line">        std::cerr &lt;&lt; res &lt;&lt; std::endl;</div><div class="line">        <span class="keywordflow">return</span> 1;</div><div class="line">    }</div><div class="line">    res += child.closeStdIn();</div><div class="line">    <span class="keywordflow">if</span> (!res) {</div><div class="line">        std::cerr &lt;&lt; res &lt;&lt; std::endl;</div><div class="line">        <span class="keywordflow">return</span> 1;</div><div class="line">    }</div></div><!-- fragment --><p> Now, you can use <code><a class="el" href="structchi_1_1Subprocess.html#ab07c04b4c4ef24cde067e11faf0837ce" title="Check if the process is still running. ">running()</a></code> to see if the process has exited yet. We'll just use <code><a class="el" href="structchi_1_1Subprocess.html#a2f57bcbe46b93798d8ca769dc7aab4c9" title="Wait and gets the exit code. ">exitCode()</a></code> to wait for the process to complete and get its exit code:</p>
<div class="fragment"><div class="line">    <span class="keywordtype">int</span> exitCode = child.exitCode();</div><div class="line">    <span class="keywordflow">if</span> (exitCode != 0) {</div><div class="line">        std::cerr &lt;&lt; <span class="stringliteral">&quot;Failed run /bin/sh &lt; &#39;echo hi&#39; with exit code: &quot;</span> &lt;&lt; exitCode &lt;&lt; std::endl;</div><div class="line">        <span class="keywordflow">return</span> 1;</div><div class="line">    }</div></div><!-- fragment --><p> Now that the process has exited, it's safe to use the <code>stdOut</code> string:</p>
<div class="fragment"><div class="line">    std::cout &lt;&lt; stdOut &lt;&lt; std::endl;</div></div><!-- fragment --><dl><dt><b>Examples: </b></dt><dd><a class="el" href="SubprocessExample_8cpp-example.html#_a0">SubprocessExample.cpp</a>.</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="Subprocess_8hpp_source.html#l00052">52</a> of file <a class="el" href="Subprocess_8hpp_source.html">Subprocess.hpp</a>.</p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a650660115d11ccf9f4d0e3569554115e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a650660115d11ccf9f4d0e3569554115e">&#9670;&nbsp;</a></span>Subprocess()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">chi::Subprocess::Subprocess </td>
          <td>(</td>
          <td class="paramtype">const boost::filesystem::path &amp;&#160;</td>
          <td class="paramname"><em>pathToExecutable</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Construct a <a class="el" href="structchi_1_1Subprocess.html" title="Provides an platform-independent abstraction for creating subprocesses. ">Subprocess</a> with a path to an executable. </p>
<dl class="section pre"><dt>Precondition</dt><dd><code>boost::filesystem::is_regular_file(pathToExecutable)</code> </dd></dl>

<p class="definition">Definition at line <a class="el" href="Subprocess_8cpp_source.html#l00572">572</a> of file <a class="el" href="Subprocess_8cpp_source.html">Subprocess.cpp</a>.</p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a889d6dcbd8488df673b6e12c29447e7c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a889d6dcbd8488df673b6e12c29447e7c">&#9670;&nbsp;</a></span>arguments()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">const std::vector&lt;std::string&gt;&amp; chi::Subprocess::arguments </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Get the currently set arguments for the program. </p>
<dl class="section return"><dt>Returns</dt><dd>The arguments </dd></dl>

<p class="definition">Definition at line <a class="el" href="Subprocess_8hpp_source.html#l00104">104</a> of file <a class="el" href="Subprocess_8hpp_source.html">Subprocess.hpp</a>.</p>

</div>
</div>
<a id="a3f07d6a6acf5e139c5161210ae0726cb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3f07d6a6acf5e139c5161210ae0726cb">&#9670;&nbsp;</a></span>attachStringToStdErr()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void chi::Subprocess::attachStringToStdErr </td>
          <td>(</td>
          <td class="paramtype">std::string &amp;&#160;</td>
          <td class="paramname"><em>str</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Attach a string to stderr. </p>
<p>Everything added to the string is appended. This is just a convenicence function, it just calls attachToStdout with a function appending the data to the string. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">str</td><td>The string to append stderr to </td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>Don't try to read from <code>str</code> while the program is running, it could create a race condition. </dd></dl>
<dl class="section pre"><dt>Precondition</dt><dd><code><a class="el" href="structchi_1_1Subprocess.html#a9b2f4ecd9a0239232deaf3ff46c48bf0" title="Check if the child has started (start() has been called) ">started()</a> == false</code> </dd></dl>

<p class="definition">Definition at line <a class="el" href="Subprocess_8hpp_source.html#l00146">146</a> of file <a class="el" href="Subprocess_8hpp_source.html">Subprocess.hpp</a>.</p>

<p class="reference">References <a class="el" href="Subprocess_8hpp_source.html#l00122">attachToStdErr()</a>.</p>

<p class="reference">Referenced by <a class="el" href="CCompiler_8cpp_source.html#l00017">chi::compileCToLLVM()</a>.</p>
<div id="dynsection-0" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-0-trigger" src="closed.png" alt="+"/> Here is the call graph for this function:</div>
<div id="dynsection-0-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-0-content" class="dyncontent" style="display:none;">
<div class="center"><div class="zoom"><iframe scrolling="no" frameborder="0" src="structchi_1_1Subprocess_a3f07d6a6acf5e139c5161210ae0726cb_cgraph.svg" width="100%" height="366"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
</div>
</div>
<div id="dynsection-1" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-1-trigger" src="closed.png" alt="+"/> Here is the caller graph for this function:</div>
<div id="dynsection-1-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-1-content" class="dyncontent" style="display:none;">
<div class="center"><div class="zoom"><iframe scrolling="no" frameborder="0" src="structchi_1_1Subprocess_a3f07d6a6acf5e139c5161210ae0726cb_icgraph.svg" width="100%" height="600"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
</div>
</div>

</div>
</div>
<a id="a1b08709bbb208a970888ebcccc58906c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1b08709bbb208a970888ebcccc58906c">&#9670;&nbsp;</a></span>attachStringToStdOut()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void chi::Subprocess::attachStringToStdOut </td>
          <td>(</td>
          <td class="paramtype">std::string &amp;&#160;</td>
          <td class="paramname"><em>str</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Attach a string to stdout. </p>
<p>Everything added to the string is appended. This is just a convenicence function, it just calls attachToStdout with a function appending the data to the string. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">str</td><td>The string to append stdout to </td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>Don't try to read from <code>str</code> while the program is running, it could create a race condition. </dd></dl>
<dl class="section pre"><dt>Precondition</dt><dd><code><a class="el" href="structchi_1_1Subprocess.html#a9b2f4ecd9a0239232deaf3ff46c48bf0" title="Check if the child has started (start() has been called) ">started()</a> == false</code> </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="SubprocessExample_8cpp-example.html#a1">SubprocessExample.cpp</a>.</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="Subprocess_8hpp_source.html#l00135">135</a> of file <a class="el" href="Subprocess_8hpp_source.html">Subprocess.hpp</a>.</p>

<p class="reference">References <a class="el" href="Subprocess_8hpp_source.html#l00111">attachToStdOut()</a>.</p>

<p class="reference">Referenced by <a class="el" href="CCompiler_8cpp_source.html#l00017">chi::compileCToLLVM()</a>.</p>
<div id="dynsection-2" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-2-trigger" src="closed.png" alt="+"/> Here is the call graph for this function:</div>
<div id="dynsection-2-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-2-content" class="dyncontent" style="display:none;">
<div class="center"><div class="zoom"><iframe scrolling="no" frameborder="0" src="structchi_1_1Subprocess_a1b08709bbb208a970888ebcccc58906c_cgraph.svg" width="100%" height="366"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
</div>
</div>
<div id="dynsection-3" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-3-trigger" src="closed.png" alt="+"/> Here is the caller graph for this function:</div>
<div id="dynsection-3-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-3-content" class="dyncontent" style="display:none;">
<div class="center"><div class="zoom"><iframe scrolling="no" frameborder="0" src="structchi_1_1Subprocess_a1b08709bbb208a970888ebcccc58906c_icgraph.svg" width="100%" height="600"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
</div>
</div>

</div>
</div>
<a id="ad1c5751c1ef62ae1020aafdbeee36fbb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad1c5751c1ef62ae1020aafdbeee36fbb">&#9670;&nbsp;</a></span>attachToStdErr()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void chi::Subprocess::attachToStdErr </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structchi_1_1Subprocess.html#a7ae98dd49171bcffb8d3a64714b4f5b1">pipeHandler</a>&#160;</td>
          <td class="paramname"><em>stdErrHandler</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Attach a function handler to the child stderr. </p>
<p>Every time data is recieved through the stderr pipe of the child, it will be sent to this handler </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">stdErrHandler</td><td>The handler </td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd><code>stdErrHandler</code> will exclusively be called from another thread. </dd></dl>
<dl class="section pre"><dt>Precondition</dt><dd><code><a class="el" href="structchi_1_1Subprocess.html#a9b2f4ecd9a0239232deaf3ff46c48bf0" title="Check if the child has started (start() has been called) ">started()</a> == false</code> </dd></dl>

<p class="definition">Definition at line <a class="el" href="Subprocess_8hpp_source.html#l00122">122</a> of file <a class="el" href="Subprocess_8hpp_source.html">Subprocess.hpp</a>.</p>

<p class="reference">References <a class="el" href="Subprocess_8hpp_source.html#l00166">started()</a>.</p>

<p class="reference">Referenced by <a class="el" href="Subprocess_8hpp_source.html#l00146">attachStringToStdErr()</a>.</p>
<div id="dynsection-4" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-4-trigger" src="closed.png" alt="+"/> Here is the call graph for this function:</div>
<div id="dynsection-4-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-4-content" class="dyncontent" style="display:none;">
<div class="center"><div class="zoom"><iframe scrolling="no" frameborder="0" src="structchi_1_1Subprocess_ad1c5751c1ef62ae1020aafdbeee36fbb_cgraph.svg" width="100%" height="366"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
</div>
</div>
<div id="dynsection-5" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-5-trigger" src="closed.png" alt="+"/> Here is the caller graph for this function:</div>
<div id="dynsection-5-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-5-content" class="dyncontent" style="display:none;">
<div class="center"><div class="zoom"><iframe scrolling="no" frameborder="0" src="structchi_1_1Subprocess_ad1c5751c1ef62ae1020aafdbeee36fbb_icgraph.svg" width="100%" height="600"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
</div>
</div>

</div>
</div>
<a id="a8a74fc88aa957ff035f446495b7c7a7a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8a74fc88aa957ff035f446495b7c7a7a">&#9670;&nbsp;</a></span>attachToStdOut()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void chi::Subprocess::attachToStdOut </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structchi_1_1Subprocess.html#a7ae98dd49171bcffb8d3a64714b4f5b1">pipeHandler</a>&#160;</td>
          <td class="paramname"><em>stdOutHandler</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Attach a function handler to the child stdout. </p>
<p>Every time data is recieved through the stdout pipe of the child, it will be sent to this handler </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">stdOutHandler</td><td>The handler </td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd><code>stdOutHandler</code> will exclusively be called from another thread. </dd></dl>
<dl class="section pre"><dt>Precondition</dt><dd><code><a class="el" href="structchi_1_1Subprocess.html#a9b2f4ecd9a0239232deaf3ff46c48bf0" title="Check if the child has started (start() has been called) ">started()</a> == false</code> </dd></dl>

<p class="definition">Definition at line <a class="el" href="Subprocess_8hpp_source.html#l00111">111</a> of file <a class="el" href="Subprocess_8hpp_source.html">Subprocess.hpp</a>.</p>

<p class="reference">References <a class="el" href="Subprocess_8hpp_source.html#l00166">started()</a>.</p>

<p class="reference">Referenced by <a class="el" href="Subprocess_8hpp_source.html#l00135">attachStringToStdOut()</a>.</p>
<div id="dynsection-6" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-6-trigger" src="closed.png" alt="+"/> Here is the call graph for this function:</div>
<div id="dynsection-6-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-6-content" class="dyncontent" style="display:none;">
<div class="center"><div class="zoom"><iframe scrolling="no" frameborder="0" src="structchi_1_1Subprocess_a8a74fc88aa957ff035f446495b7c7a7a_cgraph.svg" width="100%" height="366"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
</div>
</div>
<div id="dynsection-7" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-7-trigger" src="closed.png" alt="+"/> Here is the caller graph for this function:</div>
<div id="dynsection-7-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-7-content" class="dyncontent" style="display:none;">
<div class="center"><div class="zoom"><iframe scrolling="no" frameborder="0" src="structchi_1_1Subprocess_a8a74fc88aa957ff035f446495b7c7a7a_icgraph.svg" width="100%" height="600"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
</div>
</div>

</div>
</div>
<a id="a45fd483d620609100cdd6065ce4751f2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a45fd483d620609100cdd6065ce4751f2">&#9670;&nbsp;</a></span>closeStdIn()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structchi_1_1Result.html">Result</a> chi::Subprocess::closeStdIn </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Close the STDIN stream (send an EOF) </p>
<dl class="section return"><dt>Returns</dt><dd>The <a class="el" href="structchi_1_1Result.html" title="The result object, used for identifiying errors with good diagnostics. ">Result</a> </dd></dl>
<dl class="section pre"><dt>Precondition</dt><dd><code>!isStdInClosed()</code> </dd>
<dd>
<code><a class="el" href="structchi_1_1Subprocess.html#ab07c04b4c4ef24cde067e11faf0837ce" title="Check if the process is still running. ">running()</a></code> </dd></dl>
<dl class="section post"><dt>Postcondition</dt><dd><code><a class="el" href="structchi_1_1Subprocess.html#a9497b25fd496cd7a0ad464dfeb6e242d" title="Checks if the stdin is closed. ">isStdInClosed()</a></code> </dd></dl>

<p class="definition">Definition at line <a class="el" href="Subprocess_8cpp_source.html#l00388">388</a> of file <a class="el" href="Subprocess_8cpp_source.html">Subprocess.cpp</a>.</p>

<p class="reference">References <a class="el" href="Result_8cpp_source.html#l00052">chi::Result::addEntry()</a>.</p>

<p class="reference">Referenced by <a class="el" href="CCompiler_8cpp_source.html#l00017">chi::compileCToLLVM()</a>, and <a class="el" href="Subprocess_8hpp_source.html#l00166">started()</a>.</p>
<div id="dynsection-8" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-8-trigger" src="closed.png" alt="+"/> Here is the call graph for this function:</div>
<div id="dynsection-8-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-8-content" class="dyncontent" style="display:none;">
<div class="center"><iframe scrolling="no" frameborder="0" src="structchi_1_1Subprocess_a45fd483d620609100cdd6065ce4751f2_cgraph.svg" width="600" height="38"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
</div>
<div id="dynsection-9" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-9-trigger" src="closed.png" alt="+"/> Here is the caller graph for this function:</div>
<div id="dynsection-9-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-9-content" class="dyncontent" style="display:none;">
<div class="center"><div class="zoom"><iframe scrolling="no" frameborder="0" src="structchi_1_1Subprocess_a45fd483d620609100cdd6065ce4751f2_icgraph.svg" width="100%" height="600"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
</div>
</div>

</div>
</div>
<a id="a2f57bcbe46b93798d8ca769dc7aab4c9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2f57bcbe46b93798d8ca769dc7aab4c9">&#9670;&nbsp;</a></span>exitCode()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int chi::Subprocess::exitCode </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Wait and gets the exit code. </p>
<dl class="section return"><dt>Returns</dt><dd>The exit code. 0 for success. </dd></dl>
<dl class="section pre"><dt>Precondition</dt><dd><code><a class="el" href="structchi_1_1Subprocess.html#a9b2f4ecd9a0239232deaf3ff46c48bf0" title="Check if the child has started (start() has been called) ">started()</a></code> </dd></dl>

<p class="definition">Definition at line <a class="el" href="Subprocess_8cpp_source.html#l00534">534</a> of file <a class="el" href="Subprocess_8cpp_source.html">Subprocess.cpp</a>.</p>

<p class="reference">Referenced by <a class="el" href="CCompiler_8cpp_source.html#l00017">chi::compileCToLLVM()</a>, and <a class="el" href="Subprocess_8hpp_source.html#l00188">isStdInClosed()</a>.</p>
<div id="dynsection-10" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-10-trigger" src="closed.png" alt="+"/> Here is the caller graph for this function:</div>
<div id="dynsection-10-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-10-content" class="dyncontent" style="display:none;">
<div class="center"><div class="zoom"><iframe scrolling="no" frameborder="0" src="structchi_1_1Subprocess_a2f57bcbe46b93798d8ca769dc7aab4c9_icgraph.svg" width="100%" height="600"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
</div>
</div>

</div>
</div>
<a id="a9497b25fd496cd7a0ad464dfeb6e242d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9497b25fd496cd7a0ad464dfeb6e242d">&#9670;&nbsp;</a></span>isStdInClosed()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool chi::Subprocess::isStdInClosed </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Checks if the stdin is closed. </p>
<dl class="section return"><dt>Returns</dt><dd>true if it is, false otherwise </dd></dl>

<p class="definition">Definition at line <a class="el" href="Subprocess_8hpp_source.html#l00188">188</a> of file <a class="el" href="Subprocess_8hpp_source.html">Subprocess.hpp</a>.</p>

<p class="reference">References <a class="el" href="Subprocess_8cpp_source.html#l00534">exitCode()</a>, <a class="el" href="Subprocess_8cpp_source.html#l00520">kill()</a>, <a class="el" href="Subprocess_8cpp_source.html#l00550">running()</a>, and <a class="el" href="Subprocess_8cpp_source.html#l00525">wait()</a>.</p>
<div id="dynsection-11" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-11-trigger" src="closed.png" alt="+"/> Here is the call graph for this function:</div>
<div id="dynsection-11-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-11-content" class="dyncontent" style="display:none;">
<div class="center"><iframe scrolling="no" frameborder="0" src="structchi_1_1Subprocess_a9497b25fd496cd7a0ad464dfeb6e242d_cgraph.svg" width="399" height="190"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
</div>

</div>
</div>
<a id="aaaf29ada876d6088621cc0d8c84c7e47"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aaaf29ada876d6088621cc0d8c84c7e47">&#9670;&nbsp;</a></span>kill()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void chi::Subprocess::kill </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Kill the child process On POSIX, this sends SIGINT. </p>
<dl class="section pre"><dt>Precondition</dt><dd><code><a class="el" href="structchi_1_1Subprocess.html#a9b2f4ecd9a0239232deaf3ff46c48bf0" title="Check if the child has started (start() has been called) ">started()</a></code> </dd></dl>

<p class="definition">Definition at line <a class="el" href="Subprocess_8cpp_source.html#l00520">520</a> of file <a class="el" href="Subprocess_8cpp_source.html">Subprocess.cpp</a>.</p>

<p class="reference">Referenced by <a class="el" href="Subprocess_8hpp_source.html#l00188">isStdInClosed()</a>.</p>
<div id="dynsection-12" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-12-trigger" src="closed.png" alt="+"/> Here is the caller graph for this function:</div>
<div id="dynsection-12-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-12-content" class="dyncontent" style="display:none;">
<div class="center"><iframe scrolling="no" frameborder="0" src="structchi_1_1Subprocess_aaaf29ada876d6088621cc0d8c84c7e47_icgraph.svg" width="364" height="52"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
</div>

</div>
</div>
<a id="a62114d525126e682028af5a906f771a6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a62114d525126e682028af5a906f771a6">&#9670;&nbsp;</a></span>pushToStdIn()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structchi_1_1Result.html">Result</a> chi::Subprocess::pushToStdIn </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>size</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Pushes data to the stdin stream of the child process. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">data</td><td>The pointer to the start of the data </td></tr>
    <tr><td class="paramname">size</td><td>How long the data is </td></tr>
  </table>
  </dd>
</dl>
<dl class="section pre"><dt>Precondition</dt><dd><code><a class="el" href="structchi_1_1Subprocess.html#a9b2f4ecd9a0239232deaf3ff46c48bf0" title="Check if the child has started (start() has been called) ">started()</a></code> </dd>
<dd>
<code>!isStdInClosed()</code> </dd></dl>

<p class="definition">Definition at line <a class="el" href="Subprocess_8cpp_source.html#l00374">374</a> of file <a class="el" href="Subprocess_8cpp_source.html">Subprocess.cpp</a>.</p>

<p class="reference">References <a class="el" href="Result_8cpp_source.html#l00052">chi::Result::addEntry()</a>.</p>

<p class="reference">Referenced by <a class="el" href="CCompiler_8cpp_source.html#l00017">chi::compileCToLLVM()</a>, and <a class="el" href="Subprocess_8hpp_source.html#l00166">started()</a>.</p>
<div id="dynsection-13" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-13-trigger" src="closed.png" alt="+"/> Here is the call graph for this function:</div>
<div id="dynsection-13-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-13-content" class="dyncontent" style="display:none;">
<div class="center"><iframe scrolling="no" frameborder="0" src="structchi_1_1Subprocess_a62114d525126e682028af5a906f771a6_cgraph.svg" width="612" height="38"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
</div>
<div id="dynsection-14" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-14-trigger" src="closed.png" alt="+"/> Here is the caller graph for this function:</div>
<div id="dynsection-14-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-14-content" class="dyncontent" style="display:none;">
<div class="center"><div class="zoom"><iframe scrolling="no" frameborder="0" src="structchi_1_1Subprocess_a62114d525126e682028af5a906f771a6_icgraph.svg" width="100%" height="600"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
</div>
</div>

</div>
</div>
<a id="ab07c04b4c4ef24cde067e11faf0837ce"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab07c04b4c4ef24cde067e11faf0837ce">&#9670;&nbsp;</a></span>running()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool chi::Subprocess::running </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Check if the process is still running. </p>
<dl class="section return"><dt>Returns</dt><dd>true if it's still running, false otherwise </dd></dl>
<dl class="section pre"><dt>Precondition</dt><dd><code><a class="el" href="structchi_1_1Subprocess.html#a9b2f4ecd9a0239232deaf3ff46c48bf0" title="Check if the child has started (start() has been called) ">started()</a></code> </dd></dl>

<p class="definition">Definition at line <a class="el" href="Subprocess_8cpp_source.html#l00550">550</a> of file <a class="el" href="Subprocess_8cpp_source.html">Subprocess.cpp</a>.</p>

<p class="reference">Referenced by <a class="el" href="Subprocess_8hpp_source.html#l00188">isStdInClosed()</a>.</p>
<div id="dynsection-15" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-15-trigger" src="closed.png" alt="+"/> Here is the caller graph for this function:</div>
<div id="dynsection-15-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-15-content" class="dyncontent" style="display:none;">
<div class="center"><iframe scrolling="no" frameborder="0" src="structchi_1_1Subprocess_ab07c04b4c4ef24cde067e11faf0837ce_icgraph.svg" width="391" height="52"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
</div>

</div>
</div>
<a id="a38101f1406d62b1dc386072f576b990f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a38101f1406d62b1dc386072f576b990f">&#9670;&nbsp;</a></span>setArguments() <span class="overload">[1/3]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename ForwardIterator &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void chi::Subprocess::setArguments </td>
          <td>(</td>
          <td class="paramtype">const ForwardIterator &amp;&#160;</td>
          <td class="paramname"><em>begin</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const ForwardIterator &amp;&#160;</td>
          <td class="paramname"><em>end</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Set the arguments for the program with a begin and end iterator. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">begin</td><td>The start iterator of arguments. Should be an iterator of something converatable to std::string </td></tr>
    <tr><td class="paramname">end</td><td>The end iterator. Should be an iterator of something converatable to std::string </td></tr>
  </table>
  </dd>
</dl>
<dl class="section pre"><dt>Precondition</dt><dd><code><a class="el" href="structchi_1_1Subprocess.html#a9b2f4ecd9a0239232deaf3ff46c48bf0" title="Check if the child has started (start() has been called) ">started()</a> == false</code> </dd></dl>

<p class="definition">Definition at line <a class="el" href="Subprocess_8hpp_source.html#l00075">75</a> of file <a class="el" href="Subprocess_8hpp_source.html">Subprocess.hpp</a>.</p>

<p class="reference">References <a class="el" href="Subprocess_8hpp_source.html#l00166">started()</a>.</p>

<p class="reference">Referenced by <a class="el" href="CCompiler_8cpp_source.html#l00017">chi::compileCToLLVM()</a>, and <a class="el" href="Subprocess_8hpp_source.html#l00091">setArguments()</a>.</p>
<div id="dynsection-16" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-16-trigger" src="closed.png" alt="+"/> Here is the call graph for this function:</div>
<div id="dynsection-16-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-16-content" class="dyncontent" style="display:none;">
<div class="center"><div class="zoom"><iframe scrolling="no" frameborder="0" src="structchi_1_1Subprocess_a38101f1406d62b1dc386072f576b990f_cgraph.svg" width="100%" height="366"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
</div>
</div>
<div id="dynsection-17" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-17-trigger" src="closed.png" alt="+"/> Here is the caller graph for this function:</div>
<div id="dynsection-17-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-17-content" class="dyncontent" style="display:none;">
<div class="center"><div class="zoom"><iframe scrolling="no" frameborder="0" src="structchi_1_1Subprocess_a38101f1406d62b1dc386072f576b990f_icgraph.svg" width="100%" height="600"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
</div>
</div>

</div>
</div>
<a id="a8a66d790bd0984727c5a45e00fb05f58"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8a66d790bd0984727c5a45e00fb05f58">&#9670;&nbsp;</a></span>setArguments() <span class="overload">[2/3]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename Range &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void chi::Subprocess::setArguments </td>
          <td>(</td>
          <td class="paramtype">Range &amp;&amp;&#160;</td>
          <td class="paramname"><em>range</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Set the arguments for the program with a range. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">range</td><td>The range. Must have <code>begin()</code> and <code>end()</code> functions, which return iterators. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section pre"><dt>Precondition</dt><dd><code><a class="el" href="structchi_1_1Subprocess.html#a9b2f4ecd9a0239232deaf3ff46c48bf0" title="Check if the child has started (start() has been called) ">started()</a> == false</code> </dd></dl>

<p class="definition">Definition at line <a class="el" href="Subprocess_8hpp_source.html#l00091">91</a> of file <a class="el" href="Subprocess_8hpp_source.html">Subprocess.hpp</a>.</p>

<p class="reference">References <a class="el" href="Subprocess_8hpp_source.html#l00075">setArguments()</a>.</p>
<div id="dynsection-18" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-18-trigger" src="closed.png" alt="+"/> Here is the call graph for this function:</div>
<div id="dynsection-18-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-18-content" class="dyncontent" style="display:none;">
<div class="center"><div class="zoom"><iframe scrolling="no" frameborder="0" src="structchi_1_1Subprocess_a8a66d790bd0984727c5a45e00fb05f58_cgraph.svg" width="100%" height="366"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
</div>
</div>

</div>
</div>
<a id="ae280118b573601a288c6c8eaac834d6c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae280118b573601a288c6c8eaac834d6c">&#9670;&nbsp;</a></span>setArguments() <span class="overload">[3/3]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void chi::Subprocess::setArguments </td>
          <td>(</td>
          <td class="paramtype">std::initializer_list&lt; const char *&gt;&#160;</td>
          <td class="paramname"><em>init</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Set the arguments for the program with an initializer_list. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">init</td><td>the initializer list </td></tr>
  </table>
  </dd>
</dl>
<dl class="section pre"><dt>Precondition</dt><dd><code><a class="el" href="structchi_1_1Subprocess.html#a9b2f4ecd9a0239232deaf3ff46c48bf0" title="Check if the child has started (start() has been called) ">started()</a> == false</code> </dd></dl>

<p class="definition">Definition at line <a class="el" href="Subprocess_8hpp_source.html#l00098">98</a> of file <a class="el" href="Subprocess_8hpp_source.html">Subprocess.hpp</a>.</p>

<p class="reference">References <a class="el" href="Subprocess_8hpp_source.html#l00075">setArguments()</a>.</p>
<div id="dynsection-19" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-19-trigger" src="closed.png" alt="+"/> Here is the call graph for this function:</div>
<div id="dynsection-19-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-19-content" class="dyncontent" style="display:none;">
<div class="center"><div class="zoom"><iframe scrolling="no" frameborder="0" src="structchi_1_1Subprocess_ae280118b573601a288c6c8eaac834d6c_cgraph.svg" width="100%" height="366"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
</div>
</div>

</div>
</div>
<a id="ac15b0c5788d615c6cc9badd58bfa57b0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac15b0c5788d615c6cc9badd58bfa57b0">&#9670;&nbsp;</a></span>setWorkingDirectory()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void chi::Subprocess::setWorkingDirectory </td>
          <td>(</td>
          <td class="paramtype">boost::filesystem::path&#160;</td>
          <td class="paramname"><em>newWd</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Set the working directory of the process. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">newWd</td><td>The new working directory </td></tr>
  </table>
  </dd>
</dl>
<dl class="section pre"><dt>Precondition</dt><dd><code><a class="el" href="structchi_1_1Subprocess.html#a9b2f4ecd9a0239232deaf3ff46c48bf0" title="Check if the child has started (start() has been called) ">started()</a> == false</code> </dd></dl>

<p class="definition">Definition at line <a class="el" href="Subprocess_8hpp_source.html#l00153">153</a> of file <a class="el" href="Subprocess_8hpp_source.html">Subprocess.hpp</a>.</p>

<p class="reference">References <a class="el" href="Subprocess_8cpp_source.html#l00405">start()</a>.</p>
<div id="dynsection-20" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-20-trigger" src="closed.png" alt="+"/> Here is the call graph for this function:</div>
<div id="dynsection-20-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-20-content" class="dyncontent" style="display:none;">
<div class="center"><div class="zoom"><iframe scrolling="no" frameborder="0" src="structchi_1_1Subprocess_ac15b0c5788d615c6cc9badd58bfa57b0_cgraph.svg" width="100%" height="300"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
</div>
</div>

</div>
</div>
<a id="a1a8a312f1f2279a6b0290c3794968136"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1a8a312f1f2279a6b0290c3794968136">&#9670;&nbsp;</a></span>start()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structchi_1_1Result.html">Result</a> chi::Subprocess::start </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Start the process. </p>
<p>After this is called, most of the Setup Functions cannot be called anymore </p><dl class="section return"><dt>Returns</dt><dd>The <a class="el" href="structchi_1_1Result.html" title="The result object, used for identifiying errors with good diagnostics. ">Result</a>. </dd></dl>
<dl class="section pre"><dt>Precondition</dt><dd><code><a class="el" href="structchi_1_1Subprocess.html#a9b2f4ecd9a0239232deaf3ff46c48bf0" title="Check if the child has started (start() has been called) ">started()</a> == false</code> </dd></dl>
<dl class="section post"><dt>Postcondition</dt><dd><code><a class="el" href="structchi_1_1Subprocess.html#a9b2f4ecd9a0239232deaf3ff46c48bf0" title="Check if the child has started (start() has been called) ">started()</a></code> </dd></dl>

<p class="definition">Definition at line <a class="el" href="Subprocess_8cpp_source.html#l00405">405</a> of file <a class="el" href="Subprocess_8cpp_source.html">Subprocess.cpp</a>.</p>

<p class="reference">References <a class="el" href="Result_8cpp_source.html#l00052">chi::Result::addEntry()</a>.</p>

<p class="reference">Referenced by <a class="el" href="CCompiler_8cpp_source.html#l00017">chi::compileCToLLVM()</a>, and <a class="el" href="Subprocess_8hpp_source.html#l00153">setWorkingDirectory()</a>.</p>
<div id="dynsection-21" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-21-trigger" src="closed.png" alt="+"/> Here is the call graph for this function:</div>
<div id="dynsection-21-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-21-content" class="dyncontent" style="display:none;">
<div class="center"><iframe scrolling="no" frameborder="0" src="structchi_1_1Subprocess_a1a8a312f1f2279a6b0290c3794968136_cgraph.svg" width="564" height="38"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
</div>
<div id="dynsection-22" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-22-trigger" src="closed.png" alt="+"/> Here is the caller graph for this function:</div>
<div id="dynsection-22-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-22-content" class="dyncontent" style="display:none;">
<div class="center"><div class="zoom"><iframe scrolling="no" frameborder="0" src="structchi_1_1Subprocess_a1a8a312f1f2279a6b0290c3794968136_icgraph.svg" width="100%" height="600"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
</div>
</div>

</div>
</div>
<a id="a9b2f4ecd9a0239232deaf3ff46c48bf0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9b2f4ecd9a0239232deaf3ff46c48bf0">&#9670;&nbsp;</a></span>started()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool chi::Subprocess::started </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Check if the child has started (<code><a class="el" href="structchi_1_1Subprocess.html#a1a8a312f1f2279a6b0290c3794968136" title="Start the process. ">start()</a></code> has been called) </p>
<dl class="section return"><dt>Returns</dt><dd>True if it has, false otherwise </dd></dl>

<p class="definition">Definition at line <a class="el" href="Subprocess_8hpp_source.html#l00166">166</a> of file <a class="el" href="Subprocess_8hpp_source.html">Subprocess.hpp</a>.</p>

<p class="reference">References <a class="el" href="Subprocess_8cpp_source.html#l00388">closeStdIn()</a>, and <a class="el" href="Subprocess_8cpp_source.html#l00374">pushToStdIn()</a>.</p>

<p class="reference">Referenced by <a class="el" href="Subprocess_8hpp_source.html#l00122">attachToStdErr()</a>, <a class="el" href="Subprocess_8hpp_source.html#l00111">attachToStdOut()</a>, and <a class="el" href="Subprocess_8hpp_source.html#l00075">setArguments()</a>.</p>
<div id="dynsection-23" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-23-trigger" src="closed.png" alt="+"/> Here is the call graph for this function:</div>
<div id="dynsection-23-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-23-content" class="dyncontent" style="display:none;">
<div class="center"><div class="zoom"><iframe scrolling="no" frameborder="0" src="structchi_1_1Subprocess_a9b2f4ecd9a0239232deaf3ff46c48bf0_cgraph.svg" width="100%" height="366"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
</div>
</div>
<div id="dynsection-24" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-24-trigger" src="closed.png" alt="+"/> Here is the caller graph for this function:</div>
<div id="dynsection-24-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-24-content" class="dyncontent" style="display:none;">
<div class="center"><div class="zoom"><iframe scrolling="no" frameborder="0" src="structchi_1_1Subprocess_a9b2f4ecd9a0239232deaf3ff46c48bf0_icgraph.svg" width="100%" height="600"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
</div>
</div>

</div>
</div>
<a id="aeea9178c987445e45d97e4d4210a983c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aeea9178c987445e45d97e4d4210a983c">&#9670;&nbsp;</a></span>wait()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void chi::Subprocess::wait </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Wait for the process to complete. </p>
<dl class="section pre"><dt>Precondition</dt><dd><code><a class="el" href="structchi_1_1Subprocess.html#a9b2f4ecd9a0239232deaf3ff46c48bf0" title="Check if the child has started (start() has been called) ">started()</a></code> </dd></dl>

<p class="definition">Definition at line <a class="el" href="Subprocess_8cpp_source.html#l00525">525</a> of file <a class="el" href="Subprocess_8cpp_source.html">Subprocess.cpp</a>.</p>

<p class="reference">Referenced by <a class="el" href="Subprocess_8hpp_source.html#l00188">isStdInClosed()</a>.</p>
<div id="dynsection-25" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-25-trigger" src="closed.png" alt="+"/> Here is the caller graph for this function:</div>
<div id="dynsection-25-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-25-content" class="dyncontent" style="display:none;">
<div class="center"><iframe scrolling="no" frameborder="0" src="structchi_1_1Subprocess_aeea9178c987445e45d97e4d4210a983c_icgraph.svg" width="371" height="52"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
</div>

</div>
</div>
<hr/>The documentation for this struct was generated from the following files:<ul>
<li>lib/support/include/chi/Support/<a class="el" href="Subprocess_8hpp_source.html">Subprocess.hpp</a></li>
<li>lib/support/src/<a class="el" href="Subprocess_8cpp_source.html">Subprocess.cpp</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="namespacechi.html">chi</a></li><li class="navelem"><a class="el" href="structchi_1_1Subprocess.html">Subprocess</a></li>
    <li class="footer">Generated on Sat Sep 16 2017 17:41:35 for chigraph by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li>
  </ul>
</div>
</body>
</html>
